﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(SomeScript))]
public class SomeScriptEditor : Editor
{

    public override void OnInspectorGUI()
    {
        //base.OnInspectorGUI();
        //DrawDefaultInspector();  //这句话和上面的意思相同，展示默认的inspector面板
        SomeScript myScript = target as SomeScript;

        EditorGUILayout.FloatField("Speed", myScript.speed);
        myScript.level = EditorGUILayout.IntField("Level", myScript.level);
        EditorGUILayout.HelpBox("This is a help box!", MessageType.Info);


    }
}
